<template>
  <div>
    <h3>{{ num }}</h3>
    <el-button @click="add">点击++</el-button>
    <hr>
    <h3>v-model</h3>
    <h4 />
  </div>
</template>
<script>
export default {
  props: {
    num: {
      type: Number,
      required: true
    }
  },
  methods: {
    validate() {
      console.log('我是son的validate')
    },
    add() {
      this.$emit('update:num', this.num + 1)
    }
  }
}
</script>
<style></style>
